package com.example.test.model;

import java.util.Set;
import java.util.concurrent.CopyOnWriteArraySet;

public class Room {
    private final String roomId;
    private final Set<String> members;

    public Room(String roomId) {
        this.roomId = roomId;
        this.members = new CopyOnWriteArraySet<>();
    }

    public void joinRoom(String userId) {
        members.add(userId);
    }

    public void leaveRoom(String userId) {
        members.remove(userId);
    }

    public Set<String> getMembers() {
        return members;
    }
}
